﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Text.RegularExpressions;

namespace StringManipluationSOAP
{
    public class StringManipluation : IStringManipluation
    {
        public int GetTimesOcurr(string searchedString, string subject)
        {
            Regex regex = new Regex(searchedString);
            MatchCollection resultCollection = regex.Matches(subject);

            return resultCollection.Count;
        }
    }
}